using TrueCode.DependencyManager;

namespace EMan.Common.DependencyInjection
{
  public static class ContainerExtensions
  {
    public static void SetAsParentOfChain(this Container container, Container chainTail)
    {
      var chainHead = chainTail;
      while(chainHead.ParentContainer != null)
        chainHead = chainHead.ParentContainer;
      chainHead.ParentContainer = container;
    }
  }
}